/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * TestCombo.java
 *
 * Created on 28 mars 2012, 10:39:24
 */

package fr.insa.glaizot;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author 4debefra
 */
public class TestCombo extends javax.swing.JPanel {

    /** Creates new form TestCombo */
    public TestCombo() {
        try {
            initComponents();
            this.jcomboNom.afficheColonne(
                    TestSGBD.nomsEmployes(TestSGBD.defautCon));
        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(this, "probleme BdD "+ex);
        }
    }

    public static void main(String[] args) {
        TestePanel.pack("oh le beau combo", new TestCombo());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jcomboNom = new fr.insa.glaizot.ColonneCombo();

        jcomboNom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jcomboNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(314, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jcomboNom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(263, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private fr.insa.glaizot.ColonneCombo jcomboNom;
    // End of variables declaration//GEN-END:variables

}
